package com.totem.base.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum FeeTypeEnum {
    FUND_WITHDRAW_FEE("FUND_WITHDRAW_FEE"),
    WITHDRAW_FEE("WITHDRAW_FEE"),
    BALANCE_CONVERSION_FEE("BALANCE_CONVERSION_FEE");

    private final String code;

    FeeTypeEnum(String code){
        this.code = code;
    }

    public static FeeTypeEnum byCode(String code) {
        for (FeeTypeEnum e: FeeTypeEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
